﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ezCloud.Data;
using System.ComponentModel.DataAnnotations;
using System.Collections.ObjectModel;

namespace ezCloud.Api.Models
{
    public class ConfigViewModels
    {

       
    }

    public class TestViewModel
    {

    }

    public class ConfigData
    {
        public Hotels currentHotel { get; set; }

        public List<Rooms> rooms { get; set; }
        public List<RoomTypes> roomTypes { get; set; }
        public List<ExtraServiceTypes> extraServiceTypes { get; set; }
        public List<ExtraServiceCategories> extraServiceCategories { get; set; }
        public List<ExtraServiceItems> extraServiceItems { get; set; }

        public List<Staffs> staffs { get; set; }
    }

    public class HotelViewModel
    {

        public int HotelId { get; set; }

        public string HotelName { get; set; }

        public string HotelAddress { get; set; }

        public string HotelEmail { get; set; }

        public string HotelPhone { get; set; }

        public int HotelFloorNum { get; set; }

        public int HotelRoomNumPerFloor { get; set; }

        public decimal HotelRoomDefaultPrice { get; set; }

        public string ezCloudSubDomain { get; set; }
        public string HotelDomain { get; set; }
        public string HotelWebsite { get; set; }
        public string HotelLogoUrl { get; set; }
        public int? HotelSizeId { get; set; }
        public bool isActive { get; set; }
        public string TimeZoneId { get; set; }
        public int TimeZoneOffset { get; set; }
        public DateTime CreatedDate { get; set; }
        public DateTime ExpireDate { get; set; }
        public int CurrencyId { get; set; }
    }

    public class ExtraServiceData 
    {
        public List<ExtraServiceTypes> extraServiceTypes { get; set; }
        public List<ExtraServiceCategories> extraServiceCategories { get; set; }
        public List<ExtraServiceItems> extraServiceItems { get; set; }
    }

    public class RoomTypeViewModel
    {
        public int RoomTypeId { get; set; }
        public string RoomTypeName { get; set; }
        public string RoomTypeCode { get; set; }
        public string RoomTypeDescription { get; set; }
        public string Image { get; set; }
        public decimal Price { get; set; }

        public bool IsHidden { get; set; }
        public int DefaultAdults { get; set; }
        public int DefaultChilds { get; set; }
        public int? OrderNumber { get; set; }
    }

    public class RoomViewModel
    {
        public int RoomId { get; set; }
        [Display(Name = "RoomName")]
        public string RoomName { get; set; }

        [Display(Name = "RoomLocation")]
        public string RoomLocation { get; set; }

        [Display(Name = "RoomDescription")]
        public string RoomDescription { get; set; }

        [Display(Name = "RoomTypeId")]
        public int RoomTypeId { get; set; }

        [Display(Name = "HouseStatus")]
        public string HouseStatus { get; set; }

        public bool IsHidden { get; set; }
        public int? FloorId { get; set; }
    }

    public class ExtraServiceTypeViewModels
    {
    }

    public class ExtraServiceCategoryViewModel
    {
        public int ExtraServiceTypeId { get; set; }

        public int ExtraServiceCategoryId { get; set; }
        public string ExtraServiceCategoryName { get; set; }
        public string ExtraServiceCategoryDescription { get; set; }

        public bool IsHidden { get; set; }
    }
    public class ExtraServiceItemsViewModel
    {
        public int ExtraServiceItemId { get; set; }
        public string ExtraServiceItemName { get; set; }
        public string ExtraServiceItemDescription { get; set; }
        public string Unit { get; set; }
        public decimal Price { get; set; }
        public bool IsChangealbe { get; set; }
        public bool IsChangeable { get; set; }
        public int ExtraServiceTypeId { get; set; }
        public int ExtraServiceCategoryId { get; set; }

        public bool IsHidden { get; set; }
        public int Priority { get; set; }
    }

    public class StaffViewModel
    {
        [Display(Name = "User Name")]
        public string UserName { get; set; }

        
        public string Email { get; set; }

        [Required]
        [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "Password")]
        public string Password { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "Confirm password")]
        [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
        public string ConfirmPassword { get; set; }

        // public string UserId { get; set; }
        //public int? HotelId { get; set; }

        public string StaffName { get; set; }
        public string Mobile { get; set; }
        public bool IsActive { get; set; }

        [Display(Name = "Description")]
        public string Description { get; set; }

        public string StaffRole { get; set; }

    }

    

    public class PriceAdjustment
    {
        public int RoomPriceAdjustmentId { get; set; }
        public int? RoomPriceId { get; set; }
        public int NumberOfHour { get; set; }
        public decimal Price { get; set; }
        public string AdjustmentCode { get; set; }
    }

    public class PlanPolicy
    {
        public RoomPrices plan { get; set; }
        public string property { get; set; }
    }

   

    public class RoomTypePlan
    {
        public RoomPrices plan { get; set; }
        public List<RoomPriceAdjustment> planDetail { get; set; }
    }

    public class RoomTypeData
    {
        public RoomTypes roomType { get;set; }
        public List<RoomTypePlan> roomTypePlanList { get; set; }

    }

    public class NewPlan
    {
        public int roomTypeId { get; set; }
        public string planName { get; set; }
        public int priority { get; set; }
    }

    public class PlanViewModel
    {
        public int? RoomPriceId { get; set; }
        public string RoomPriceName { get; set; }
        public int Priority { get; set; }
        public int HotelId { get; set; }
        public int RoomTypeId { get; set; }
        public bool isActive { get; set; }

    }

    public class PlanSchedule
    {
       // public int planId { get; set; }

        public string property { get; set; }
        public string name { get; set; }
        public DateTime? startDate { get; set; }
        public DateTime? endDate { get; set; }
        public bool ApplyOnMonday { get; set; }
        public bool ApplyOnTuesday { get; set; }
        public bool ApplyOnWednesday { get; set; }
        public bool ApplyOnThursday { get; set; }
        public bool ApplyOnFriday { get; set; }
        public bool ApplyOnSaturday { get; set; }
        public bool ApplyOnSunday { get; set; }
    }

    public class PlanAdjustmentViewMode 
    {
        public PlanViewModel plan { get; set; }

        public string property { get; set; }
        public decimal price { get; set; }

        public List<PriceAdjustment> adjustment { get; set; }
    }

    

    public class PlanDetail
    {
        public string property { get; set; }
        public string name { get; set; }
        public bool isUsed { get; set; }
        public string adjustmentCode { get; set; }
        public decimal price { get; set; }

        public List<PriceAdjustment> adjustment { get; set; }
    }

   /* public class CurrrentPlanDetail
    {
        public PlanViewModel CurrentPlan { get; set; }
        public bool UseHourlyPrice { get; set; }
        public bool UseDayNightPrice { get;set; }
        public bool UseFullDayPrice { get;set; }

        public bool UseWeeklyPrice { get;set; }
        public bool UseMonthlyPrice { get;set; }

        public bool UseExtraAdultPrice { get;set; }

        public bool UseExtraChildPrice { get; set; }
    }*/


    public class UseHourlyPrice
    {
        public string property { get; set; }
        public string name { get; set; }
        public bool isUsed { get; set; }
        public string adjustmentCode { get; set; }
        public List<PriceAdjustment> adjustment { get; set; }
    }

    public class UseFullDayPrice
    {
        public string property { get; set; }
        public string name { get; set; }
        public bool isUsed { get; set; }

        public decimal? price { get; set; }
        public string adjustmentCode { get; set; }
        public List<PriceAdjustment> adjustment { get; set; }
    }

    public class UseEarlyCheckInFullDay
    {
        public string property { get; set; }
        public string name { get; set; }
        public bool isUsed { get; set; }

        public decimal? price { get; set; }
        public string adjustmentCode { get; set; }
        public List<PriceAdjustment> adjustment { get; set; }
    }

    public class UseEarlyCheckInDayNight
    {
        public string property { get; set; }
        public string name { get; set; }
        public bool isUsed { get; set; }

        public decimal? price { get; set; }
        public string adjustmentCode { get; set; }
        public List<PriceAdjustment> adjustment { get; set; }
    }

    public class UseDayNightPrice
    {
        public string property { get; set; }
        public string name { get; set; }
        public bool isUsed { get; set; }
        public decimal? price { get; set; }
        public string adjustmentCode { get; set; }
        public List<PriceAdjustment> adjustment { get; set; }
    }

    public class UseWeeklyPrice
    {
        public string property { get; set; }
        public string name { get; set; }
        public bool isUsed { get; set; }
        public decimal? price { get; set; }
        public string adjustmentCode { get; set; }
        public List<PriceAdjustment> adjustment { get; set; }
    }

    public class UseMonthlyPrice
    {
        public string property { get; set; }
        public string name { get; set; }
        public bool isUsed { get; set; }
        public decimal? price { get; set; }
        public string adjustmentCode { get; set; }
        public List<PriceAdjustment> adjustment { get; set; }
    }

    public class UseExtraAdultPrice
    {
        public string property { get; set; }
        public string name { get; set; }
        public bool isUsed { get; set; }

        public int? defaultAdults { get; set; }
        public decimal? extraAdultPrice { get; set; }
        public string adjustmentCode { get; set; }
        //public List<PriceAdjustment> adjustment { get; set; }
    }

    public class UseExtraChildPrice
    {
        public string property { get; set; }
        public string name { get; set; }
        public bool isUsed { get; set; }

        public int? defaultChildren { get; set; }
        public decimal? extraChildPrice { get; set; }
        public string adjustmentCode { get; set; }
        //public List<PriceAdjustment> adjustment { get; set; }
    }





    public class PlanDetailViewModel
    {
        public PlanViewModel Plan { get; set; }
        public PlanSchedule PlanSchedule { get; set; }
        public UseHourlyPrice UseHourlyPrice { get; set; }
        public UseFullDayPrice UseFullDayPrice { get; set; }
        public UseEarlyCheckInFullDay UseEarlyCheckinFullDay { get; set; }
        public UseDayNightPrice UseDayNightPrice { get; set; }
        public UseEarlyCheckInDayNight UseEarlyCheckinDayNight { get; set; }

        public UseWeeklyPrice UseWeeklyPrice { get; set; }
        public UseMonthlyPrice UseMonthlyPrice { get; set; }
        public UseExtraAdultPrice UseExtraAdultPrice { get; set; }
        public UseExtraChildPrice UseExtraChildPrice { get; set; }
    }

    public class PlanListViewModel
    {
        public RoomTypes RoomType { get; set; }
        public List<PlanViewModel> PlanList { get; set; }
    }

    public class Currency
    {
        public int MoneyId { get; set; }
        public string MoneyName { get; set; }
        public string Description { get; set; }
        public double ExchangeRate { get; set; }
        public int HotelId { get; set; }
        public int CurrencyId { get; set; }
    }

    public class CurrencyModel
    {
        public int index { get; set; }
        public List<Currency> currencyList { get; set; }
    }

    public class StatusColor
    {
        public int StatusColorId { get; set; }
        public string StatusCode {get;set;}
        public string ColorCode { get; set; }
        public string DefaultColorCode { get; set; }
        public int HotelId { get; set; }
    }

    public class Language
    {
        public int LanguageId { get; set; }
        public string LanguageName { get; set; }
        public string LanguageCode { get; set; }
        public string LanguageDescription { get; set; }
    }

    public class ConfigSystemData
    {
        public int? currentHotelDefaultMoneyId { get; set; }
        public List<Money> moneys { get; set; }
        public List<Currencies> currencies { get; set; }
        public List<StatusColors> statusColorList { get; set; }

        public HotelTimeSetting hotelTimeSetting { get; set; }

        public HotelForm hotelFormRoomInvoice { get; set; }
        public HotelForm hotelFormRoomReceipt { get; set; }
        //public List<Languages> languageList { get; set; }
        public List<HotelConnectivity> connectivities { get; set; }
    }

    public class HotelConnectivity
    {
        public HotelConnectivityModuleCode code { get; set; }
        public bool isUsed { get; set; }
        public bool IsInputCardToCheckout { set; get; }
        public bool? IsAutomaticalAddHourCheckout { set; get; }
        public int? HourAddToCheckout { set; get; }
    }

    public class PlanPreview
    {
        public DateTime previewStartDate { get; set; }
        public DateTime previewEndDate { get; set; }

        public int adults { get; set; }
        public int children { get; set; }
        public PlanDetailViewModel planDetailViewModel { get; set; }
    }

    public class HotelTimeSetting
    {
        public TimeSpan? FullDayCheckoutTime { get; set; }
        public TimeSpan? FullDayCheckinTime { get; set; }
        public bool UseDayNightSetting { get; set; }
        public TimeSpan? DayNightStartTime { get; set; }
        public TimeSpan? DayNightEndTime { get; set; }
        public TimeSpan NightAuditTime { get; set; }

        public int MinutesToRoundUp { get; set; }
        public bool? IsRoomDirtyAfterNightAudit { get; set; }

        TimeSpan TimeZoneOffset { get; set; }

        public string TimeZoneId { get; set; }
        public bool? UseTimeInOutPrivate { get; set; }
        public TimeSpan? TimeInPrivate { get; set; }
        public TimeSpan? TimeOutPrivate { get; set; }

        public ReadOnlyCollection<TimeZoneInfo> listTimeZone { get; set; }
    }

    public class CurrentRoomType
    {
        public RoomTypes roomType { get; set; }
        public List<PlanViewModel> planList { get; set; }
        public List<PlanDetailViewModel> planDetailList { get; set; }
    }

    public class PlanListPreviewModel
    {
        public DateTime previewStartDate { get; set; }
        public DateTime previewEndDate { get; set; }

        public int adults { get; set; }
        public int children { get; set; }
        public int? RoomPriceId { get; set; }
        public bool FOC { get; set; }
        public float DiscountPercentage { get; set; }
        public decimal DiscountFlat { get; set; }
        public CurrentRoomType currentRoomType { get; set; }
    }

    public class RepairViewModel
    {
        public string action { get; set; }
        public int roomId { get; set; }
        public int roomRepairId { get; set; }
        public DateTime? repairStartDate { get; set; }
        public DateTime? repairEndDate { get; set; }
    }

    public class RoomReservation
    {
        public int roomId { get; set; }
        public DateTime? startDate { get; set; }
        public DateTime? endDate { get; set; }
    }

    public class RoomSelected
    {
        public int RoomId { get; set; }

        public string RoomName { get; set; }

        public string RoomLocation { get; set; }

        public string RoomDescription { get; set; }

        public int? RoomTypeId { get; set; }

        public int? HotelId { get; set; }

        public string HouseStatus { get; set; }

        public System.DateTime? RepairStartDate { get; set; }

        public System.DateTime? RepairEndDate { get; set; }

        public bool IsHidden { get; set; }
    }

    public class RoomSelectedList
    {
        public List<RoomSelected> roomList { get; set; }
    }
}





